/*
 * GameObject.cpp
 *
 *  Created on: Dec 12, 2012
 *      Author: kroell
 */

#include "GameObject.h"

/*std::string GameObject::translateColor(enum Color color) {
	switch (color) {
	case RESET:
		return "\e[1;33m";
	case BLACK:
		return "\033[30m";
	case RED:
		return "\033[31m";
	case GREEN:
		return "\033[32m";
	case YELLOW:
		return "\033[33m";
	case BLUE:
		return "\033[34m";
	case MAGENTA:
		return "\033[35m";
	case CYAN:
		return "\033[36m";
	case WHITE:
		return "\033[37m";
	default:
		return "\033[0m";
	}
}*/

std::ostream& operator<<(std::ostream& output, const GameObject& go) {
    output << go.represent;
    return output;  // for multiple << operators (chaining)
}

GameObject::GameObject() {
	// set speed and power to 1 if created w/o values
	speed = 1;
	power = 1;

	//make color the normal term color
	color = RESET;

	//error if K is printed! :P
	represent = 'K';
}

GameObject::GameObject(int in_speed, int in_power) {
	//create object with set values
	speed = in_speed;
	power = in_power;

	//make color normal term color
	color = RESET;

	represent = 'k';
}

GameObject::~GameObject() {
	// nothing to destroy!... yet
}

int GameObject::getSpeed() {
	return speed;
}

int GameObject::getPower() {
	return power;
}

char GameObject::getRep() {
	return represent;
}

void GameObject::setSpeed(int in_speed){
	speed = in_speed;
}

void GameObject::setPower(int in_power){
	power = in_power;
}

